package com.itjavas.cslp2.service.impl;

import com.itjavas.cslp2.mapper.CommentMapper;
import com.itjavas.cslp2.pojo.entity.Comment;
import com.itjavas.cslp2.pojo.entity.Course;
import com.itjavas.cslp2.service.CommentService;
import jdk.jfr.consumer.RecordedEvent;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class CommentServiceImpl implements CommentService {
    @Autowired
    CommentMapper commentMapper;
    //添加评论
    public ResponseEntity<Boolean> addComment (Comment comment){
        return ResponseEntity.ok(commentMapper.addComment(comment));
    }
    //删除评论
    public ResponseEntity<Boolean> deleteComment(String string){
        return ResponseEntity.ok(commentMapper.deleteComment(string));
    }
}
